﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Factory
{
    /// <summary>
    /// 获取实现接口的类的实例的工厂方法
    /// </summary>
    public class Factory
    {
        /// <summary>
        /// 获取词法分析器
        /// </summary>
        /// <param name="code">源代码</param>
        /// <returns>词法分析器</returns>
        public static ILexAnalysis.ILexAnalysis GetLex(string code)
        {
            return new LexAnalysis.LexAnalysis(code);
        }
    }
}
